const state = {
  menuType: '',
  pcPower: [],
  appPower: [],
  storePcMenuId: '',
  storeAppMenuId: '',
  pcTimestamp: '',
  appTimestamp: ''
};

const mutations = {
  // 重置所有状态数据
  resetState(state) {
    state.menuType = '';
    state.pcPower = [];
    state.appPower = [];
    state.storePcMenuId = '';
    state.storeAppMenuId = '';
    state.pcTimestamp = '';
    state.appTimestamp = '';
  },
  // 设置当前点击菜单类型
  setMenuType(state, value) {
    state.menuType = value;
  },
  // 存储PC端菜单
  storagePcPower(state, value) {
    state.pcPower = value;
  },
  // 存储APP端菜单
  storageAppPower(state, value) {
    state.appPower = value;
  },
  // 设置当前PC选中菜单id
  setPcMenuId(state, value) {
    state.storePcMenuId = value;
  },
  // 设置当前APP选中菜单id
  setAppMenuId(state, value) {
    state.storeAppMenuId = value;
  },
  // 设置PC时间戳
  setPcTimestamp(state, value) {
    state.pcTimestamp = value;
  },
  // 设置APP时间戳
  setAppTimestamp(state, value) {
    state.appTimestamp = value;
  }
};

const actions = {};

export default {
  namespaced: true,
  state,
  mutations,
  actions
};
